import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
import axios from "axios";
import echarts from 'echarts'
import it from "element-ui/src/locale/lang/it";

Vue.config.productionTip = false
axios.defaults.baseURL = 'http://127.0.0.1:60';

//请求拦截器
axios.interceptors.request.use(config=>{

  var item = sessionStorage.getItem("token");
  if (item){
    config.headers.token=item;
  }
  return config;
})

//把axios 原生挂载
Vue.prototype.$http=axios;
Vue.prototype.$echarts = echarts;

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
